<template>
    <div>
        <van-nav-bar class="ti" title="快来畅所欲言吧！" />
        <WenzhCom v-for="wz in wenzhs" :key="wz.articleId" v-bind="wz"></WenzhCom>
        <van-sticky :offset-bottom="70" position="bottom" z-index="3">
            <van-button class="bt1" type="primary" to="/addArticle">+</van-button>
        </van-sticky>
        <div class="blc"></div>
    </div>
</template>

<script>
import WenzhCom from '@/components/WenzhCom.vue'
import axios from 'axios'

    export default {
        components:{
            WenzhCom,
        },
        created(){
            axios.get("http://localhost:8087/article/selectAll").then((res)=>{
                this.wenzhs = res.data.data
                console.log(this.wenzhs)
            })
        },
        data() {
            return {
                wenzhs: {},
            }
        },

    }
</script>

<style lang="scss" scoped>
div{
    position: relative;
    ::v-deep .van-nav-bar__title{
        font-weight: bold;
        font-size: 5vw;
        color: rgb(244, 92, 62);
    }
    .bt1{
        position: absolute;
        top: -8vw;
        right: 5vw;
        font-size: 8vw;
        border-radius: 50%;
        background-color: rgb(236, 86, 48);
        border: none;
        width: 11vw;
    }
    .blc{
        height: 20vw;
    }
}
</style>